﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"  CodeBehind="Default.aspx.cs" Inherits="YBApproval._Default"  Culture="zh-CN" UICulture="zh-CN" %>
<%@ MasterType VirtualPath="~/Site.master" %>  
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxCT" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">    
    <script src="Scripts/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="Scripts/jquery-ui.js" type="text/javascript"></script>
    <script src="Scripts/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
    <link href="Styles/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {
            //            $("#datepicker").datepicker({ changeMonth: true, changeYear: true }).datepicker($.datepicker.regional[""]);
            $("#datepicker").datepicker($.datepicker.regional["zh-CN"]);
            $("#datepicker").datepicker("option", "changeMonth", true);
            $("#datepicker").datepicker("option", "changeYear", true);
        });
    </script>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

<asp:Panel runat=server ID=PanelAllPrecess  BorderStyle=None>
        <div id="AllPrecessHeader" style="background-image:url('images/st2.jpg'); display:block; height:18px;">
        <div style="float:left;display:block;">&nbsp;<asp:Label ID="TextLabel" runat="server" >启动新流程</asp:Label></div>
        <div  style="float:right; vertical-align:top;display:block;"><asp:Image ID=Image1 runat=server ImageUrl="~/images/up.gif" />&nbsp;</div></div>
        <br />
        <div id="panelParent" style="border:0px red outset;display:block;">
        <asp:Panel ID="ContentPanel" runat="server" BorderStyle=None>
<table width="670px" border=0 cellpadding=0 cellspacing=0>
 <tr style="display:block;">
    <td colspan="2" >
        <table cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td align="left" valign="top">
                    <img src="images/Process.jpg" />
                </td>
                <td style="width:20px;"></td>
                <td align="left" valign="top" class="TDProcessText">
                <table>
                <% =Table1Rows %>
                </table>
                </td>
                <td align="left" valign="top"  class="TDProcessText">
                <table>
<%--                <tr>
                <td style="width:220px;"><li class="ProcessText"><a href="#" id="4">Business Travel</a></li></td>
                            <td><img src="/images/help.png" style="cursor:hand;" /></td><td style="width:5px;">&nbsp;</td>
                            <td><img src="/images/process.png" style="cursor:hand;" /></td><td style="width:5px;">&nbsp;</td>
                </tr>--%>
                <% =Table2Rows %>
                </table>
                </td>
             </tr>
        </table>
    </td>
  </tr>
</table>
        </asp:Panel>
        </div>
</asp:Panel>
 <ajaxCT:CollapsiblePanelExtender ID="cpeAllProcess" runat="Server"
    TargetControlID="ContentPanel"
    CollapsedSize="0"
    ExpandedSize="100"
    Collapsed="True"
    ExpandControlID="AllPrecessHeader"
    CollapseControlID="AllPrecessHeader"
    AutoCollapse="False"
    AutoExpand="False"
    ScrollContents="false"
    TextLabelID=""
    CollapsedText="Show Details..."
    ExpandedText="Hide Details" 
    ImageControlID="Image1"
    ExpandedImage="~/images/up.gif"
    CollapsedImage="~/images/down.gif"
    ExpandDirection="Vertical"/>
    <div> &nbsp       
    </div>
    <asp:Panel runat=server ID=PanelToApproval  BorderStyle=None>
        <div id="ToApprovalHeader" style="background-image:url('images/st1.jpg');display:block; height:18px;">
        <div style="float:left;display:block;">&nbsp;<asp:Label ID="Label1" runat="server" >我的代办事项</asp:Label></div>
        <div  style="float:right; vertical-align:top;display:block;"><asp:Image ID=ImageToApproval runat=server ImageUrl="~/images/up.gif"/>&nbsp;</div></div>
        <br />
        <div id="Div2" style="border:0px red outset;display:block;">
        <asp:Panel ID="PanelToApprovalContent" runat="server" BorderStyle=None>
<table width="670px" border=0 cellpadding=0 cellspacing=0>
 <tr style="display:block;">
    <td colspan="2" >
        <table cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td align="left" valign="top">
                    <img src="images/05HR.jpg" />
                </td>
                <td style="width:20px;"></td>
                <td align="left" valign="top" class="TDProcessText" colspan=2>
                <asp:GridView runat=server ID=gvMyCurrentAction AutoGenerateColumns="False"  
                        Width="560px" EmptyDataText="当前没有需要你处理的申请！" 
                        onrowcommand="gvMyCurrentAction_RowCommand" BorderStyle=Solid BorderWidth=0>
                        <emptydatarowstyle ForeColor="Black" />
                            <Columns>
                                    <asp:BoundField DataField="RecordId" HeaderText="申请编号" HeaderStyle-Width="15%"/>
                                    <asp:BoundField DataField="ProcessName" HeaderText="名称" HeaderStyle-Width="30%"/>
                                    <asp:BoundField DataField="Submitter" HeaderText="提交人" HeaderStyle-Width="20%"/>
                                    <asp:BoundField DataField="StepName" HeaderText="步骤" HeaderStyle-Width="15%"/>
                                    <asp:BoundField DataField="SubmitDate" HeaderText="提交日期" HeaderStyle-Width="15%"/>
                                    <asp:TemplateField ShowHeader="False" HeaderStyle-Width="10%">
<ItemTemplate>
<asp:LinkButton ID="btnLinktoAction" runat="server" CausesValidation="False" CommandName="Operation" Text="打开流程"  CommandArgument='<%# Bind("RecordId") %>' ></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
                                </Columns>
                                <HeaderStyle Font-Bold="False" Font-Size="Small" />
                            </asp:GridView>
                </td>
             </tr>
        </table>
    </td>
  </tr>
</table>
        </asp:Panel>
        </div>
</asp:Panel>
 <ajaxCT:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="Server"
    TargetControlID="PanelToApprovalContent"
    CollapsedSize="0"
    ExpandedSize="100"
    Collapsed="True"
    ExpandControlID="ToApprovalHeader"
    CollapseControlID="ToApprovalHeader"
    AutoCollapse="False"
    AutoExpand="False"
    ScrollContents="false"
    TextLabelID=""
    CollapsedText="Show Details..."
    ExpandedText="Hide Details" 
    ImageControlID="ImageToApproval"
    ExpandedImage="~/images/up.gif"
    CollapsedImage="~/images/down.gif"
    ExpandDirection="Vertical"/>
    <div> &nbsp       
    </div>
    <asp:Panel runat=server ID=PanelHistory  BorderStyle=None>
        <div id="PanelHistoryHeader" style="background-image:url('images/st2.jpg');display:block; height:18px;">
        <div style="float:left;display:block;">&nbsp;<asp:Label ID="Label2" runat="server" >我的当前流程</asp:Label></div>
        <div style="float:right; vertical-align:top;display:block;"><asp:Image ID=ImageHistory runat=server ImageUrl="~/images/up.gif"/>&nbsp;</div></div>
        <br />
        <div id="Div3" style="border:0px red outset;display:block;">
        <asp:Panel ID="ContentPanelHistory" runat="server" BorderStyle=None>
<table width="670px" border=0 cellpadding=0 cellspacing=0>
 <tr style="display:block;">
    <td colspan="2" >
        <table cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td align="left" valign="top">
                    <img src="images/03IT.jpg" />
                </td>
                <td style="width:20px;"></td>
                <td align="left" valign="top" class="TDProcessText" colspan=2>
                <asp:GridView runat=server ID=gvMyInprocess AutoGenerateColumns="False"  
                        Width="560px" EmptyDataText="你没有在处理中的申请！" BorderStyle=None 
                        onrowcommand="gvMyInprocess_RowCommand">
                        <emptydatarowstyle ForeColor="Black" />
                            <Columns>
                                    <asp:BoundField DataField="RecordId" HeaderText="申请编号" HeaderStyle-Width="20%"/>
                                    <asp:BoundField DataField="ProcessName" HeaderText="名称" HeaderStyle-Width="30%"/>
                                    <asp:BoundField DataField="StepName" HeaderText="步骤" HeaderStyle-Width="20%"/>
                                    <asp:BoundField DataField="SubmitDate" HeaderText="提交日期" HeaderStyle-Width="20%"/>
                                    <asp:TemplateField ShowHeader="False" HeaderStyle-Width="10%">
<ItemTemplate>
<asp:LinkButton ID="btnView" runat="server" CausesValidation="False" CommandName="ViewDetail" Text="查看"  CommandArgument='<%# Bind("RecordId") %>' ></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
                                </Columns>
                                <HeaderStyle Font-Bold="False" Font-Size="Small" />
                            </asp:GridView>
                </td>
             </tr>
        </table>
    </td>
  </tr>
</table>
        </asp:Panel>
        </div>
</asp:Panel>
 <ajaxCT:CollapsiblePanelExtender ID="CPEHistory" runat="Server"
    TargetControlID="ContentPanelHistory"
    CollapsedSize="0"
    ExpandedSize="100"
    Collapsed="True"
    ExpandControlID="PanelHistoryHeader"
    CollapseControlID="PanelHistoryHeader"
    AutoCollapse="False"
    AutoExpand="False"
    ScrollContents="false"
    TextLabelID=""
    CollapsedText="Show Details..."
    ExpandedText="Hide Details" 
    ImageControlID="ImageHistory"
    ExpandedImage="~/images/up.gif"
    CollapsedImage="~/images/down.gif"
    ExpandDirection="Vertical"/>
    
    <div> &nbsp       
    </div>
    <asp:Panel runat=server ID=PanelDraft  BorderStyle=None>
        <div id="PanelDraftHeader" style="background-image:url('images/st1.jpg');display:block; height:18px;">
        <div style="float:left; vertical-align:top; display:block;">&nbsp;<asp:Label ID="Label3" runat="server" >我的草稿箱</asp:Label></div>
        <div style="float:right; vertical-align:top; display:block;"><asp:Image ID=ImageDraft runat=server ImageUrl="~/images/up.gif"/>&nbsp;</div></div>
        <br />
        <div id="Div4" style="border:0px red outset;display:block;">
        <asp:Panel ID="ContentPanelDraft" runat="server" BorderStyle=None>
<table width="670px" border=0 cellpadding=0 cellspacing=0>
 <tr style="display:block;">
    <td colspan="2" >
        <table cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td align="left" valign="top">
                    <img src="images/04Manufacturing.jpg" />
                </td>
                <td style="width:20px;"></td>
                <td align="left" valign="top" class="TDProcessText" colspan=2>
                <asp:GridView runat=server ID=gvDraft AutoGenerateColumns="False"   Width="560px" 
                        EmptyDataText="你的草稿箱是空的！" onrowcommand="gvDraft_RowCommand" BorderStyle=None>
                        <emptydatarowstyle ForeColor="Black" />
                            <Columns>
                                    <asp:BoundField DataField="RecordId" HeaderText="申请编号" HeaderStyle-Width="30%"/>
                                    <asp:BoundField DataField="ProcessName" HeaderText="名称" HeaderStyle-Width="30%"/>
                                    <asp:BoundField DataField="UpdateDate" HeaderText="保存日期" HeaderStyle-Width="30%"/>
                                    <asp:TemplateField ShowHeader="False" HeaderStyle-Width="10%">
<ItemTemplate>
<asp:LinkButton ID="btnEdit" runat="server" CausesValidation="False" CommandName="EditDraft" Text="编辑"  CommandArgument='<%# Bind("RecordId") %>' ></asp:LinkButton>
<asp:LinkButton ID="btnDel" runat="server" CausesValidation="False" OnClientClick="return confirm('确定删除这条草稿？');" CommandName="DelDraft" Text="删除"  CommandArgument='<%# Bind("RecordId") %>' ></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
                                </Columns>
                                <HeaderStyle Font-Bold="False" Font-Size="Small" />
                            </asp:GridView>
                </td>
             </tr>
        </table>
    </td>
  </tr>
</table>
        </asp:Panel>
        </div>
</asp:Panel>
 <ajaxCT:CollapsiblePanelExtender ID="CollapsiblePanelExtender2" runat="Server"
    TargetControlID="ContentPanelDraft"
    CollapsedSize="0"
    ExpandedSize="100"
    Collapsed="True"
    ExpandControlID="PanelDraftHeader"
    CollapseControlID="PanelDraftHeader"
    AutoCollapse="False"
    AutoExpand="False"
    ScrollContents="false"
    TextLabelID=""
    CollapsedText="Show Details..."
    ExpandedText="Hide Details" 
    ImageControlID="ImageDraft"
    ExpandedImage="~/images/up.gif"
    CollapsedImage="~/images/down.gif"
    ExpandDirection="Vertical"/>
</asp:Content>
